<?php
    $menu_1 = '';
    $menu_2 = '';
    $menu_3 = '';
    $menu_4 = '';
    $menu_5 = '';
    $menu_6 = '';
    $menu_7 = '';
    $menu_8 = '';
    include('header.php');
    
    $sql = "SELECT * FROM rss_news WHERE rn_active=1 ORDER BY rn_date DESC";
    $result = $db->Execute($sql);
    $i = 1;
    $rss_list = '';
    while (!$result->EOF)
    {
        if(img_exists(APPPATH.'/images/rss-news/'.$result->fields['rn_id'],$result->fields['rn_img'])){
            $img = '<img src="'.SITEURL.'/images/rss-news/'.$result->fields['rn_id'].'/'.$result->fields['rn_img'].'" />';
        }else{
            $img = '';
        }
        
        $rn_date = date('d/m/Y',$result->fields['rn_date']);
	
        $rss_list .=<<<packing_list
	    <div class="rss_list">
		<a href="{$result->fields['rn_url']}" target="_blank" rel="nofollow">
		<div class="rss_list_img">{$img}</div>
		<div class="rss_list_detail">
		    <p class="rss_list_desc">{$result->fields['rn_desc']}</p>
		    <p class="rss_list_from">Date : {$rn_date}&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;From : {$result->fields['rn_from']}</p>
		</div>
		</a>
		<div class="clear">&nbsp;</div>
	    </div>
packing_list;
        
        $result->MoveNext();
    }
    $result->Close();
?>
	    <div id="main_content">
		
		<div class="page_title" id="news_title">
		    <img src="images/rss_news_title.jpg" alt="RSS News" />
		</div>
		
		<div id="content_top">&nbsp;</div>
		<div id="content_center" class="rss_content">
		    <?php echo $rss_list; ?>
		</div>
		<div id="content_bottom">&nbsp;</div>
		
	    </div>
<?php
    include('footer.php');
?>